import os
from dao.project_url import url
from dao.install_cluster import spark, hadoop

url = url()


def delete_cluster(name, types):
    if types == 1:  # 1代表spark
        spark(name)
        os.system("kubectl delete -f %s/static/cluster/spark1.yaml" % url)
    elif types == 2:  # 2代表Hadoop
        hadoop(name)
        os.system("kubectl delete -f %s/static/cluster/hadoop1.yaml" % url)
    else:
        pass



